package ro.one.gaeql.model;

import java.io.Serializable;
import java.util.Map;

public class Kind implements Serializable {
	private static final long serialVersionUID = 1L;
	
	String name;

	public Kind(String name) {
		this.name = name;
	}
	
	public String getName() {
		return name;
	}
	
	public static Kind getKindByAlias(String alias, Map<String, Kind> aliases, Kind defaultKind) {
		if (alias == null) {
			return defaultKind;
		}
		else {
			return aliases.get(alias);
		}
	}
}
